define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.groupsteam/index',


    };

    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh',
                    [],
                    ],
                cols: [[
                    {type: "checkbox"},
                    {field: 'id', minWidth: 40, title: 'ID'},
                    {field: 'nickName', minWidth: 100, title: '团长昵称',search: false},
                    {field: 'ordersn', minWidth: 120, title: '订单号',search: false},
                    {field: 'goods_id', minWidth: 40, title: '商品编号',search: false},
                    {field: 'goods_name', minWidth: 120, title: '商品名称',search: false},
                    {field: 'nownum', minWidth: 80, title: '参团人数',search: false},
                    {field: 'users', minWidth: 150, title: '其他参团人员',search: false},
                    {field: 'status', title: '拼团状态', minWidth: 80, selectList: { 0: '拼团中', 1: '拼团完成',2:'拼团失败'}},
                    {field: 'create_time', minWidth: 100, title: '开团时间', search: 'range'},
                    {field: 'endtime', minWidth: 100, title: '满团时间', search: 'range'},
                    {
                        width: 100,
                        title: '操作',
                        templet: ea.table.tool,
                        operat: [
                            [],
                        ]
                    }
                ]],
            });

            ea.listen();
        },
        member:function (){
            ea.listen();
        }
    };
    return Controller;
});